All checks passed! ============================= test session starts ============================== platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0 django: version: 6.0.6, settings: settings.test (from ini) rootdir: /app configfile: pyproject.toml testpaths: tests plugins: cov-7.1.0, django-4.12.0, asyncio-1.4.0, mock-3.15.1, anyio-4.14.0, Faker-40.23.0, factoryboy-2.8.1 asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function collected 712 items tests/assets/api/test_views.py EEEEEEEEE [ 1%] tests/assets/services/test_defaults.py EEEE [ 1%] tests/assets/test_models.py EEEEEEE [ 2%] tests/capturer/test_overlay_service.py EEEEEEEE [ 3%] tests/capturer/test_tasks.py EEEEEEEEEEEEEEEE [ 6%] tests/common/test_commands.py EE [ 6%] tests/compositor/api/test_views.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 11%] EEEEEEEEEEEEE [ 13%] tests/compositor/services/test_events.py EEEEEEEEEEEEE [ 15%] tests/compositor/services/test_lifecycle.py EEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 19%] EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 29%] EEEEEEEEEEEEEEEEE [ 31%] tests/compositor/test_models.py EEEE [ 32%] tests/compositor/test_tasks.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 38%] E [ 38%] tests/overlays/api/test_pack_sessions.py EEEEEEEEE [ 39%] tests/overlays/api/test_project_control.py EEEE [ 40%] tests/overlays/api/test_project_create.py EEEEEEEE [ 41%] tests/overlays/api/test_project_list.py EEEEEEEE [ 42%] tests/overlays/api/test_project_publish.py EEEE [ 42%] tests/overlays/api/test_project_sessions.py EEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 46%] EEEEEEEEE [ 48%] tests/overlays/api/test_project_update.py EEEE [ 48%] tests/overlays/api/test_render.py EEEEE [ 49%] tests/overlays/api/test_views.py EEEEEEEEEEEEE [ 51%] tests/overlays/services/test_account_overlay_plan.py EE [ 51%] tests/overlays/services/test_control.py EEEEEEEEEEEEEEEEEEEE [ 54%] tests/overlays/services/test_create_project.py EEEEEEE [ 55%] tests/overlays/services/test_defaults.py EEEE [ 55%] tests/overlays/services/test_image_url_validation.py EEEEEE [ 56%] tests/overlays/services/test_interactive.py EEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 60%] EEEEEE [ 61%] tests/overlays/services/test_packs.py EEEEEEEEEEE [ 62%] tests/overlays/services/test_resolve_render_config.py EE [ 63%] tests/overlays/services/test_seed_templates.py EEEEEEEEEE [ 64%] tests/overlays/test_models.py EEEEEEE [ 65%] tests/recording/test_ffmpeg.py EEEE [ 66%] tests/recording/test_models.py EEE [ 66%] tests/recording/test_tasks.py EEEEEE [ 67%] tests/recording/test_views.py EEEEEEEEEEE [ 68%] tests/sources/api/test_views.py EEEEEEEEEEEEEEEEEEEEEE [ 72%] tests/sources/services/test_mediamtx.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 76%] EEEE [ 77%] tests/broadcast/test_consumers.py EEE [ 77%] tests/broadcast/test_routing.py E [ 77%] tests/compositor/services/test_lifecycle.py E [ 77%] tests/overlays/test_consumers.py EEEEEEE [ 78%] tests/overlays/test_routing.py EEE [ 79%] tests/overlays/test_session_consumers.py EEEEEEEEE [ 80%] tests/assets/test_models.py . [ 80%] tests/capturer/test_overlay_service.py ............... [ 82%] tests/capturer/test_process_manager.py ................ [ 84%] tests/capturer/test_tasks.py ... [ 85%] tests/common/services/test_auth.py ...... [ 86%] tests/compositor/services/test_dispatcher.py ........................... [ 90%] ..................................... [ 95%] tests/compositor/test_choices.py .. [ 95%] tests/compositor/test_tasks.py ............. [ 97%] tests/overlays/test_choices.py ....... [ 98%] tests/overlays/test_models.py . [ 98%] tests/sources/services/test_mediamtx.py ....... [ 99%] tests/test_asgi.py . [ 99%] tests/test_storage.py ... [100%] ==================================== ERRORS ==================================== ______________________ ERROR at setup of test_upload_logo ______________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________ ERROR at setup of test_upload_sets_owner_from_jwt _______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________________ ERROR at setup of test_upload_requires_auth __________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_list_returns_only_own_account_assets __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________________ ERROR at setup of test_rql_filter_by_type ___________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ ERROR at setup of test_rql_filter_by_is_default ________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________________ ERROR at setup of test_delete_asset ______________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_delete_asset_cascades_to_its_composition_source ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_delete_other_account_asset_not_found __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_seed_creates_default_assets_for_account ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________________ ERROR at setup of test_seed_sets_correct_types ________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________________ ERROR at setup of test_seed_is_idempotent ___________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________ ERROR at setup of test_seed_on_account_cqrs_created ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ ERROR at setup of test_broadcast_asset_creation ________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_broadcast_asset_video_has_duration ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________ ERROR at setup of test_seeded_default_asset_has_flag _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_user_created_asset_not_default_by_default _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________________ ERROR at setup of test_asset_str _______________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________________ ERROR at setup of test_asset_uuid_primary_key _________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________________ ERROR at setup of test_asset_owner_required __________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_validate_interactive_overlay_creates_session ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_validate_interactive_overlay_rejects_while_already_validating _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_validate_interactive_overlay_rejects_while_running ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_validate_interactive_overlay_allows_stopped ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_validate_interactive_overlay_creates_new_session_when_previous_errored _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_start_browser_overlay_dispatches_capturer_run_with_source_id _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_stop_browser_overlay_sends_stop_when_activating ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_stop_browser_overlay_noop_when_no_session _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_validate_transitions_to_valid_on_success ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_validate_transitions_to_error_on_navigation_failure __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________ ERROR at setup of test_validate_cleanup_always_runs ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_validate_nonexistent_session_is_no_op _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_validate_wrong_status_is_no_op _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_validate_success_starts_browser_overlay ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_validate_failure_does_not_start_browser_overlay ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_run_transitions_to_activating_then_stops ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_run_transitions_to_error_when_gst_push_fails ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_run_transitions_to_error_when_jwt_missing _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_run_accepts_stopped_session_for_reactivation ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_run_publishes_to_overlays_path _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_run_crash_deactivates_source_and_notifies_compositor __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_run_clean_stop_does_not_notify_compositor _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_check_overlay_activation_timeout_unwinds_when_still_activating _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_check_overlay_activation_timeout_noop_when_already_running _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_fixturing_assets_command_creates_defaults_for_all_accounts _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_fixturing_assets_command_is_idempotent _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________________ ERROR at setup of test_create_composition ___________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_create_composition_then_attach_streams _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_add_source_cross_account_rejected ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________________ ERROR at setup of test_list_compositions ___________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________ ERROR at setup of test_rql_filter_by_installation_id _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_publish_composition_defaults_to_live __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_publish_composition_to_preview _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_publish_composition_rejects_already_live ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_apply_updates_requires_published_composition ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________ ERROR at setup of test_apply_updates_after_publish ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________________ ERROR at setup of test_stop_composition ____________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________________ ERROR at setup of test_switch_slot ______________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_switch_slot_invalid_returns_400 ____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________________ ERROR at setup of test_create_scene_via_api __________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________________ ERROR at setup of test_delete_scene_via_api __________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_delete_active_scene_via_api_rejected __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_reposition_source_moves_scene_via_api _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________ ERROR at setup of test_create_scene_preset_via_api ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________ ERROR at setup of test_list_scene_presets_via_api _______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________ ERROR at setup of test_update_scene_preset_via_api ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________ ERROR at setup of test_delete_scene_preset_via_api ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ ERROR at setup of test_fire_scene_preset_via_api _______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_delete_scene_referenced_by_preset_rejected_via_api ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_switch_scene_with_auto_return_via_api _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________ ERROR at setup of test_delete_stopped_composition _______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_delete_active_composition_rejected ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_delete_composition_with_sources_cascades ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ ERROR at setup of test_composition_requires_auth _______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_composition_retrieve_allowed_for_user_context _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_retrieve_allowed_for_module_context_same_account _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_retrieve_404s_for_module_context_different_account _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_add_controller_stream_source_creates_fresh_row _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_add_composition_source_explicit_is_visible_false_is_honored _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_add_controller_stream_source_same_stream_to_two_compositions _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_add_controller_stream_source_requires_stream_reference _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_add_controller_stream_source_rejects_non_transmitting_stream _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ ERROR at setup of test_composition_sources_list ________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_sources_list_includes_removed_by_default __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_composition_sources_list_rql_excludes_removed _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________ ERROR at setup of test_composition_sources_retrieve ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________ ERROR at setup of test_reposition_composition_source _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________ ERROR at setup of test_reposition_never_dispatches ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_remove_composition_source_never_attached_still_soft_removes _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_remove_composition_source_attached_soft_removes ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_delete_composition_source_succeeds_while_draft _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_delete_composition_source_fails_once_published[preview] _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_delete_composition_source_fails_once_published[live] __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_composition_sources_not_visible_to_other_account ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_copy_composition_source_to_scenes ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_copy_composition_source_requires_at_least_one_scene __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_terminal_status_soft_removes_attached_source ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_terminal_status_skips_draft_composition ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_terminal_status_skips_ended_composition ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_terminal_status_skips_already_unattached_source ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_terminal_status_skips_already_removed_source ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_terminal_status_covers_every_composition_holding_the_stream _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_transmitting_flags_need_update_for_unattached_source __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_transmitting_skips_draft_composition __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_transmitting_skips_already_attached_source _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_transmitting_skips_removed_source ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_transmitting_does_not_reflag_already_flagged_composition _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_transmitting_with_no_composition_source_is_a_noop ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_other_status_transitions_are_a_noop __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________________ ERROR at setup of test_create_composition ___________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_controller_stream_cross_account_rejected _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_publish_from_draft_to_live_sets_target_phase_pending_confirmation _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_publish_from_draft_to_preview_sets_target_phase_pending_confirmation _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_publish_confirmed_preview_to_live_does_not_restart_pipeline _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_first_publish_reveals_active_slot_source ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_first_publish_does_not_hide_non_slotted_sources_sharing_the_active_scene _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_first_publish_reveals_configured_active_slot ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_reconfirmed_publish_does_not_reclobber_visibility ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_publish_rejects_preview_to_preview ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________ ERROR at setup of test_publish_rejects_already_live ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_publish_rejects_ended_composition ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_apply_updates_rejects_draft_composition ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_stop_composition_sends_command _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_stop_composition_updates_broadcast_state_phase _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ ERROR at setup of test_switch_slot_sends_command _______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_switch_slot_invalid_slot_raises ____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_create_composition_source_controller_stream ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_controller_stream_reusable_across_compositions _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_controller_stream_requires_stream_id _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_controller_stream_requires_slot _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_controller_stream_requires_transmitting_stream _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_controller_stream_updates_transform_fields _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_controller_stream_never_dispatches _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_create_composition_source_asset ____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_create_composition_source_asset_requires_asset_id ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_create_composition_source_image_url __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_image_url_rejects_html_content _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_interactive_rejects_private_url _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_url_required_for_image_url __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_create_composition_source_rejects_unsupported_type ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_validate_composition_source_rejects_non_interactive __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_validate_composition_source_dispatches_for_interactive _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_reposition_composition_source_updates_transform_fields _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_reposition_composition_source_never_dispatches _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_reposition_composition_source_flags_need_update_when_live _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_reposition_composition_source_moves_to_another_scene __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_reposition_composition_source_moving_scene_never_dispatches _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_reposition_composition_source_rejects_scene_from_another_composition _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_remove_composition_source_never_attached_still_soft_removes _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_remove_composition_source_frees_its_slot_for_reuse ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_remove_composition_source_attached_soft_removes ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_remove_composition_source_interactive_stops_browser_overlay _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_remove_composition_source_interactive_copy_cascades_to_whole_group _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_remove_composition_source_interactive_no_copies_reduces_to_single_row _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_remove_composition_source_interactive_cascade_leaves_already_removed_copies_untouched _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_delete_composition_source_hard_deletes_while_draft ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_delete_composition_source_raises_once_published[preview] _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_delete_composition_source_raises_once_published[live] _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_delete_composition_source_interactive_stops_browser_overlay _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_remove_composition_source_flags_need_update_when_live _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_flags_need_update_when_composition_live _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_does_not_flag_need_update_for_draft_composition _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_source_controller_stream_does_not_flag_need_update_when_draft _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_updater_marks_attached_without_dispatch_when_pipeline_not_running _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_updater_dispatches_add_when_pipeline_running _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_updater_dispatches_remove_and_keeps_history _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_updater_does_not_redispatch_an_already_processed_removal _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_updater_dispatches_interactive_when_capture_session_running _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_updater_rejects_not_ready_interactive_source _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_updater_treats_a_copy_ready_when_its_root_session_is_running _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_composition_updater_no_partial_dispatch ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_composition_updater_clears_need_update _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_updater_dispatches_transform_for_already_attached_source _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_updater_does_not_double_dispatch_transform_for_newly_attached_source _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_attach_ready_overlay_source_does_not_touch_other_sources _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_attach_ready_overlay_source_does_not_clear_need_update _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_attach_ready_overlay_source_noop_if_already_attached __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_composition_auto_creates_default_scene_and_sets_active _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_create_scene_adds_an_additional_scene _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_update_scene_renames_and_reorders ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_update_scene_partial_update_leaves_omitted_field_untouched _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_delete_scene_soft_removes_its_sources_and_the_scene_itself _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_delete_scene_stops_interactive_browser_overlay_first __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_delete_scene_rejects_the_active_scene _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_delete_scene_rejects_the_last_remaining_scene _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_delete_scene_leaves_already_removed_sources_untouched _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_deleted_scene_rejects_new_sources_and_switches _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_delete_scene_rejects_when_referenced_by_a_preset_as_primary_scene _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_delete_scene_rejects_when_referenced_by_a_preset_as_auto_return_scene _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_updates_active_scene_immediately_even_without_a_running_pipeline _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_dispatches_command_when_pipeline_running _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_per_call_overrides_take_precedence_over_composition_defaults _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_switch_scene_rejects_scene_from_another_composition __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_validates_interactive_source_with_no_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_starts_interactive_source_with_valid_session_directly _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_does_not_touch_interactive_source_already_running_or_in_flight[running] _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_does_not_touch_interactive_source_already_running_or_in_flight[validating] _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_does_not_touch_interactive_source_already_running_or_in_flight[activating] _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_entering_a_copys_scene_starts_the_governing_root_not_the_copy _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_never_stops_interactive_sources_leaving_the_old_scene _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_bump_auto_return_generation_increments_and_returns_actual_value _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_bumps_generation_even_without_auto_return _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_schedules_apply_scene_auto_return_when_given _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_auto_return_falls_back_to_default_transition _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_without_auto_return_does_not_schedule_anything _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________ ERROR at setup of test_create_scene_preset_minimal ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_create_scene_preset_with_auto_return __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_scene_preset_rejects_scene_from_another_composition _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_scenepreset_check_constraint_rejects_partial_auto_return _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_update_scene_preset_partial_update_leaves_auto_return_untouched _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_update_scene_preset_clears_auto_return_when_explicitly_none _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_update_scene_preset_sets_auto_return_wholesale _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_delete_scene_preset_hard_deletes ____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_delete_composition_with_scene_preset_cascades _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_fire_scene_preset_performs_the_configured_switch ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_fire_scene_preset_with_auto_return_schedules_the_return _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_fire_scene_preset_already_active_scene_still_arms_a_fresh_timer _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_new_controller_stream_source_in_a_scene_created_after_first_publish_is_visible_immediately _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_new_controller_stream_source_on_a_draft_composition_is_visible_immediately _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_copy_composition_source_creates_independent_rows_per_scene _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_copy_composition_source_does_not_copy_capture_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_copy_composition_source_sets_parent_source_to_the_root _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_copy_composition_source_copying_a_copy_resolves_to_the_original_root _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_copy_composition_source_non_interactive_never_sets_parent_source _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_copy_composition_source_requires_at_least_one_scene __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_copy_composition_source_rejects_scene_from_another_composition _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_controller_stream_source_is_valid ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_controller_stream_source_requires_composition _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_controller_stream_source_requires_slot _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_asset_source_requires_composition ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_run_compositor_stops_cleanly_on_stop_command ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_run_compositor_recalculates_latency_on_latency_message _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_run_compositor_connects_raw_queue_overrun_logger ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_run_compositor_exits_on_bus_error ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_run_compositor_removes_overlay_on_overlay_source_error _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_run_compositor_removes_source_on_source_error _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_run_compositor_isolates_decoder_error_not_just_connection_error _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_run_compositor_skips_retry_when_chain_already_in_flight _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_run_compositor_pipeline_failure_exits_immediately ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_run_compositor_clears_task_id_on_normal_exit ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_run_compositor_clears_output_live_on_normal_exit ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_run_compositor_clears_output_live_on_pipeline_failure _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_run_compositor_persists_output_live_transition _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_run_compositor_fails_composition_when_output_never_connects_in_time _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_run_compositor_does_not_fail_composition_on_a_quick_reconnect _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_run_compositor_fails_composition_when_reconnect_never_completes _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_run_compositor_attaches_existing_sources_on_start ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_run_compositor_switch_slot_command ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_handle_switch_slot_forces_encoder_keyframe _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_handle_switch_scene_cut_forces_encoder_keyframe ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_handle_switch_scene_fade_does_not_force_encoder_keyframe _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_handle_switch_scene_computes_effective_visibility_and_toggles _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_handle_switch_scene_toggles_interactive_sources_like_any_other_overlay _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_start_composition_task_stores_celery_task_id ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_start_composition_task_exits_when_output_auth_fails __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_start_composition_task_noop_when_composition_missing __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_retry_add_source_sends_add_source_command _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_retry_add_source_reschedules_itself __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_retry_add_source_stops_after_max_attempts _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_retry_add_source_noop_when_source_deleted _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_handle_set_source_visibility_dispatches_to_dispatcher _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_handle_set_source_visibility_noop_when_source_deleted _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_handle_set_source_visibility_defaults_omitted_keys_to_db_state _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_handle_set_source_visibility_persists_db_state _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_attach_initial_sources_adds_running_interactive_overlay _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_attach_initial_sources_skips_interactive_overlay_not_yet_running _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_apply_scene_auto_return_noop_when_composition_not_found _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_apply_scene_auto_return_noop_on_stale_generation ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_apply_scene_auto_return_calls_switch_scene_on_matching_generation _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_apply_scene_auto_return_handles_deleted_target_scene_as_noop _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_apply_scene_auto_return_end_to_end_with_real_switch_scene _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_apply_scene_auto_return_does_not_rearm_a_further_auto_return _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_returns_empty_for_module_authenticated_callers _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_returns_only_the_callers_own_sessions_in_the_pack ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_returns_every_session_across_the_callers_own_matching_projects _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_excludes_sessions_from_a_different_pack ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_each_item_includes_its_parent_project_id ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ ERROR at setup of test_nonexistent_pack_id_404s ________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________ ERROR at setup of test_invalid_pack_id_404s_not_500 ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_nonexistent_pack_id_404s_even_for_a_module_authenticated_caller _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_excludes_non_interactive_projects_even_if_templated_in_the_pack _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_control_rejects_custom_canvas_project _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ ERROR at setup of test_control_rejects_non_owner _______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_valid_control_persists_and_broadcasts _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_invalid_control_does_not_broadcast ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________________ ERROR at setup of test_create_requires_auth __________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_premium_account_creates_a_blank_custom_canvas_project _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_free_account_creating_custom_canvas_is_rejected ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_free_account_instantiates_a_free_template _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_template_controlled_without_a_template_returns_400_not_500 _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_create_wires_a_valid_automatic_subscription ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_create_rejects_a_cross_pack_subscription_with_400 ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_without_subscription_fields_defaults_to_manual _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_list_returns_only_own_projects _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_retrieve_someone_elses_project_404s_not_403 ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_module_only_call_cannot_list_projects _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_list_excludes_a_teammates_interactive_project _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_retrieve_a_teammates_interactive_project_404s _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_list_still_includes_the_callers_own_interactive_project _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_list_excludes_an_anonymous_interactive_project_for_any_user_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_list_still_shares_non_interactive_projects_across_the_same_account _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_publish_sets_is_published_true _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________________ ERROR at setup of test_publish_is_idempotent _________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________________ ERROR at setup of test_publish_non_owner_404s _________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_unpublish_sets_is_published_false_and_broadcasts_close _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_owner_can_add_a_session_when_premium __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_owner_cannot_add_a_session_when_not_premium ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_non_owner_cannot_add_a_session _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_module_auth_cannot_add_a_session ____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_module_call_lists_a_projects_one_session ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_module_call_against_a_nonexistent_project_404s _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_owner_can_list_their_own_sessions ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_non_owner_user_session_cannot_list_a_different_accounts_sessions _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_a_different_user_of_the_same_account_cannot_list_anothers_sessions _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_code_token_cannot_list_sessions ____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_owner_can_retrieve_their_own_session __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_retrieve_exposes_sync_mode_and_subscribed_session ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_retrieve_exposes_null_subscribed_session_for_a_manual_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_non_owner_cannot_retrieve_a_session __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_a_control_code_token_can_retrieve_its_own_session ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_a_read_code_token_cannot_retrieve_session_metadata ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_module_call_returns_manual_sync_mode_and_null_subscribed_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_module_call_returns_automatic_sync_mode_and_the_subscribed_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_module_call_against_an_unpublished_session_404s_on_subscription_too _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_module_call_returns_a_published_sessions_config ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_module_call_against_unpublished_session_404s ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_owner_sees_their_own_unpublished_session ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_non_owner_user_session_cannot_see_an_unpublished_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_a_read_code_token_can_render_a_published_session ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_module_call_against_an_expired_anonymous_session_403s _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_a_premium_logged_in_owners_session_is_never_expired_even_if_old _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_a_non_premium_logged_in_owners_old_session_is_expired _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_owner_can_push_state_and_it_broadcasts _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_non_owner_user_session_cannot_push_state ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_a_control_code_token_can_push_state_for_its_own_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_a_control_code_token_cannot_push_state_to_a_different_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_a_read_code_token_cannot_push_state __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_expired_anonymous_session_rejects_a_write _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_owner_can_delete_an_additional_output _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_owner_cannot_delete_a_projects_only_remaining_output __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_non_owner_cannot_delete_a_session ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_a_control_code_token_cannot_delete_a_session ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_premium_account_can_put_their_custom_canvas_project __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_downgrading_after_creation_blocks_the_very_next_put __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_put_rejects_a_template_controlled_project _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_put_cannot_change_mode_or_template ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_module_call_against_unpublished_project_404s ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_module_call_against_published_project_returns_resolved_config _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_owner_sees_own_unpublished_draft_via_user_session ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_non_owner_user_session_cannot_see_unpublished_draft __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_template_controlled_project_merges_overrides_onto_template_config _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________________ ERROR at setup of test_list_requires_auth ___________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_list_rejects_user_session_auth _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________________ ERROR at setup of test_list_allows_module_auth ________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_list_exposes_description_for_the_gallery_dialog ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_list_exposes_interactive_defaults_null_by_default ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_list_exposes_interactive_defaults_when_set _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_list_exposes_pack_null_by_default ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_list_exposes_pack_reference_when_set __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_list_never_returns_inactive_templates _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_retrieve_inactive_template_404s ____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________________ ERROR at setup of test_rql_filter_by_category _________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________________ ERROR at setup of test_rql_filter_by_pack ___________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_rql_filter_disallows_relation_traversal ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_creates_a_plan_at_the_given_tier_when_none_exists ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_upgrades_an_existing_free_plan_to_the_given_tier ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_rejects_a_path_not_in_control_fields __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_rejects_a_text_value_exceeding_max_length _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_rejects_non_string_for_text_field ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_rejects_string_list_exceeding_max_items ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_rejects_non_list_for_string_list_field _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________ ERROR at setup of test_rejects_unparseable_datetime ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________ ERROR at setup of test_accepts_valid_iso_datetime _______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________________ ERROR at setup of test_rejects_empty_color __________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_valid_subset_merges_and_only_those_keys_change _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_no_partial_merge_when_one_of_several_paths_is_invalid _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_accepts_a_counter_value_within_range __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_rejects_a_counter_value_below_min ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_rejects_a_counter_value_above_max ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_rejects_a_non_numeric_counter_value __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_accepts_a_labeled_counter_value_from_its_sequence ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_rejects_a_labeled_counter_value_outside_its_sequence __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_accepts_a_select_value_in_options ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_rejects_a_select_value_not_in_options _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________ ERROR at setup of test_accepts_a_public_image_url _______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________ ERROR at setup of test_rejects_a_private_image_url ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_free_account_cannot_create_a_blank_custom_canvas_project _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_free_account_can_instantiate_a_free_visibility_template _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_free_account_cannot_instantiate_a_premium_visibility_template _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_premium_account_can_create_a_blank_custom_canvas_project _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_template_controlled_without_a_template_is_rejected ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_creating_with_a_nonexistent_template_id_is_rejected __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_an_account_with_no_preexisting_plan_defaults_to_free_instead_of_500ing _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_ensure_creates_free_plan_for_account __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________________ ERROR at setup of test_ensure_is_idempotent __________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_ensure_does_not_downgrade_an_existing_plan _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_plan_provisioned_on_account_cqrs_created ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_create_rejects_a_config_with_a_private_image_url ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_create_accepts_a_config_with_a_public_image_url ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_update_rejects_a_config_with_a_private_image_url ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_a_config_with_no_image_elements_never_calls_is_public_url _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_update_rejects_a_template_controlled_project ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_update_on_an_account_with_no_preexisting_plan_defaults_to_free_instead_of_500ing _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_session_expires_at_is_none_for_non_interactive_modes __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_session_expires_at_is_none_for_a_premium_logged_in_creator _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_session_expires_at_has_a_clock_for_a_non_premium_logged_in_creator _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_session_expires_at_has_a_clock_for_a_logged_in_creator_with_no_explicit_plan _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_session_expires_at_is_created_at_plus_the_free_limit_for_an_anonymous_project _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_is_session_expired_false_just_before_the_limit _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_is_session_expired_true_just_after_the_limit ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_is_session_expired_always_false_for_a_premium_logged_in_creator_even_long_after_creation _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_is_session_expired_true_for_a_non_premium_logged_in_creator_long_after_creation _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_interactive_project_creates_the_project_and_its_first_session_together _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_interactive_project_with_no_subscription_fields_behaves_as_before _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_interactive_project_wires_a_valid_automatic_subscription _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_interactive_project_rolls_back_atomically_on_an_invalid_subscription _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_add_project_session_never_accepts_subscription_fields _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_interactive_project_never_gates_on_tier_even_for_a_free_account _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_interactive_project_requires_a_template_regardless_of_created_by _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_create_interactive_project_rejects_a_nonexistent_template _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_can_add_session_false_for_an_anonymous_project _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_can_add_session_false_for_a_free_logged_in_account ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_can_add_session_true_for_a_premium_logged_in_account __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_add_project_session_rejects_a_non_premium_account ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_add_project_session_starts_empty_not_a_clone_of_the_default_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_add_project_session_defaults_label_to_none _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_update_session_state_rejects_an_expired_anonymous_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_update_session_state_replaces_config_wholesale_when_not_expired _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_update_session_state_never_expires_for_a_premium_logged_in_creator _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_update_session_state_rejects_an_expired_non_premium_logged_in_creator _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_get_session_for_write_rejects_a_user_logged_into_the_anonymous_projects_own_owner_account _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_get_session_for_write_rejects_a_different_user_of_the_same_account _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_get_session_for_write_allows_the_actual_creator ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_get_session_for_render_rejects_a_user_logged_into_the_anonymous_projects_own_owner_account_when_unpublished _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_get_session_for_render_allows_the_actual_creator_to_preview_an_unpublished_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_delete_project_session_refuses_to_remove_the_last_remaining_output _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_delete_project_session_removes_an_additional_output __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________ ERROR at setup of test_manual_mode_is_always_a_noop ______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_rejects_automatic_for_a_non_premium_account ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_rejects_a_target_owned_by_a_different_account _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_rejects_a_teammates_session_in_the_same_pack ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_rejects_a_target_from_a_different_pack _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_rejects_a_target_with_no_pack_at_all __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of test_rejects_automatic_with_no_target ____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ ERROR at setup of test_rejects_a_self_reference ________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_rejects_when_the_subscribers_own_created_by_is_none __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_rejects_when_the_targets_created_by_is_none ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_accepts_a_valid_same_account_same_user_same_pack_target _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_merges_overrides_onto_the_template_config _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_a_stale_override_path_is_skipped_instead_of_raising __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_seeds_at_least_one_template_per_category ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________________ ERROR at setup of test_is_idempotent _____________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_every_seeded_template_has_a_description_for_the_gallery_dialog _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_seeded_templates_are_active_and_free_by_default ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_seeds_padel_scoreboard_exercising_every_element_and_control_field_type _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_creates_the_padel_tennis_match_day_pack ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_attaches_the_pack_to_a_freshly_seeded_scoreboard_template _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_attaches_the_pack_to_an_already_existing_scoreboard_template _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_seeds_a_match_info_card_template_in_the_same_pack ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_seeding_twice_does_not_duplicate_the_pack _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_overlay_pack_creation_defaults _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ ERROR at setup of test_overlay_pack_slug_unique ________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_overlay_template_pack_defaults_to_none _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_overlay_template_pack_settable_and_survives_pack_deletion _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_project_session_sync_mode_defaults_to_manual ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_project_session_can_subscribe_to_another_session ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_project_session_survives_subscribed_session_deletion __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_build_recording_object_url_stream_uses_streams_path_and_userinfo _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_build_recording_object_url_stream_returns_none_on_auth_failure _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_build_recording_object_url_composition_uses_live_path_and_userinfo _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_build_recording_object_url_composition_returns_none_on_auth_failure _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_composition_recording_is_valid _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ ERROR at setup of test_stream_recording_is_valid _______________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_multiple_recordings_of_same_object_allowed _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_start_recording_task_dispatches_record_with_resolved_url _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_start_recording_task_fails_recording_when_url_unavailable _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_start_recording_task_returns_early_when_recording_missing _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_record_streams_directly_to_storage_no_local_file ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_record_marks_failed_and_terminates_on_upload_error ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_record_returns_early_when_recording_missing ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_create_recording_for_live_composition _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_create_recording_rejects_non_live_composition _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_create_recording_for_transmitting_stream ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_create_recording_rejects_non_transmitting_stream ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_create_recording_cross_account_rejected ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_two_sequential_recordings_of_same_composition_produce_two_rows _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________________ ERROR at setup of test_stop_recording _____________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_retrieve_recording_serializes_owner_as_reference ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_get_queryset_excludes_other_accounts_recordings ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_list_filters_by_object_type_and_object_id_via_rql ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________________ ERROR at setup of test_requires_auth _____________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_sources_auth_overlay_source_read_returns_200 ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_sources_auth_requires_code_context ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________ ERROR at setup of test_streams_auth_read_returns_200 _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_streams_auth_publish_allowed_when_pending _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_streams_auth_publish_dispatches_notify_stream_starting_when_pending _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_streams_auth_publish_reconnect_skips_notify_stream_starting _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_streams_auth_read_rejected_when_pending ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_streams_auth_rejected_when_not_active _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_streams_auth_requires_code_context ___________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_streams_auth_rejects_url_path_object_id_mismatch ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_composition_auth_publish_returns_200 __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_composition_auth_publish_rejected_when_not_active ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_composition_ready_promotes_target_phase ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_composition_ready_returns_404_when_composition_not_found _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of test_composition_disconnected_is_a_no_op __________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_sources_ready_marks_overlay_session_running ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_sources_ready_returns_404_when_source_not_found ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_streams_ready_dispatches_notify_stream_transmitting __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_streams_disconnected_skips_already_disconnected ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_streams_disconnected_dispatches_double_check ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_streams_ready_returns_404_when_stream_not_found ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________________ ERROR at setup of test_sources_validate ____________________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_authorize_composition_publish_allowed_when_active ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_composition_publish_rejected_when_not_active _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_composition_publish_rejected_on_token_mismatch _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_authorize_stream_publish_allowed_when_starting _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_authorize_stream_publish_allowed_when_pending _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_stream_publish_when_pending_dispatches_notify_stream_starting _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_authorize_stream_read_rejected_when_pending ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_authorize_stream_read_allowed_when_transmitting ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_authorize_stream_rejected_when_finished ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of test_authorize_stream_rejected_on_token_mismatch ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_authorize_stream_rejected_when_not_found ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_stream_publish_reconnect_skips_notify_stream_starting _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_authorize_viewer_read_allowed_when_composition_live __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_viewer_read_rejected_when_composition_not_active _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_viewer_read_rejected_when_composition_in_preview _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_viewer_read_rejected_on_installation_mismatch _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_stream_viewer_read_allowed_when_transmitting _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_authorize_stream_viewer_read_rejected_when_finished __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_stream_viewer_read_rejected_on_installation_mismatch _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_stream_viewer_read_rejected_for_stream_typed_token _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of test_authorize_interactive_source_publish_allowed ______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_authorize_interactive_source_read_allowed _______ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_interactive_source_rejected_on_token_mismatch _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_interactive_source_rejected_without_capture_session _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_interactive_source_rejected_when_not_found __ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_authorize_interactive_source_rejected_for_controller_stream_row _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_notify_overlay_ready_state_dispatches_add_overlay_when_pipeline_running _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_notify_overlay_ready_state_fans_out_to_live_copies ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_notify_overlay_ready_state_does_not_attach_removed_copies _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_notify_overlay_ready_state_marks_attached_without_dispatch_when_no_pipeline _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_notify_overlay_ready_state_ignores_when_session_not_activating _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_notify_overlay_ready_state_not_ready_unwinds_attached_source _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_notify_composition_ready_state_promotes_phase_to_target_phase _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_notify_composition_ready_state_promotes_to_preview_sets_previewed_at _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_notify_composition_ready_state_no_op_when_no_target_phase_pending _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_notify_composition_ready_state_not_ready_does_not_touch_phase _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: fixturedef = request = > @pytest.hookimpl(wrapper=True) def pytest_fixture_setup(fixturedef: FixtureDef, request) -> object | None: if ( fixturedef.argname == "event_loop_policy" and fixturedef.func.__module__ != __name__ ): warnings.warn( PytestDeprecationWarning(_EVENT_LOOP_POLICY_FIXTURE_DEPRECATION_WARNING), ) asyncio_mode = _get_asyncio_mode(request.config) if not _is_asyncio_fixture_function(fixturedef.func): if asyncio_mode == Mode.STRICT: # Ignore async fixtures without explicit asyncio mark in strict mode # This applies to pytest_trio fixtures, for example return (yield) if not _is_coroutine_or_asyncgen(fixturedef.func): > return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_broadcast_consumer_connects_and_receives_state _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of test_broadcast_consumer_rejects_without_auth ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of test_broadcast_consumer_receives_state_update ________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_broadcast_ws_route_resolves_on_the_real_mounted_application _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_switch_scene_generation_bump_is_atomic_under_concurrent_calls _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: request = > django_test_environment = None django_db_blocker = django_db_use_migrations = False, django_db_keepdb = False django_db_createdb = True, django_db_modify_db_settings = None @pytest.fixture(scope="session") def django_db_setup( request: pytest.FixtureRequest, django_test_environment: None, # noqa: ARG001 django_db_blocker: DjangoDbBlocker, django_db_use_migrations: bool, django_db_keepdb: bool, django_db_createdb: bool, django_db_modify_db_settings: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Top level fixture to ensure test databases are available""" from django.test.utils import setup_databases, teardown_databases setup_databases_args = {} if not django_db_use_migrations: _disable_migrations() if django_db_keepdb and not django_db_createdb: setup_databases_args["keepdb"] = True aliases, serialized_aliases = _get_databases_for_setup(request.session.items) with django_db_blocker.unblock(): > db_cfg = setup_databases( verbosity=request.config.option.verbose, interactive=False, aliases=aliases, serialized_aliases=serialized_aliases, **setup_databases_args, ) /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_rejects_connection_without_auth ____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_code_token_for_a_different_project_is_rejected _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_valid_code_token_connects_and_receives_resolved_state _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_owner_can_connect_to_their_own_unpublished_draft ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of test_non_owner_cannot_connect_to_an_unpublished_draft ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_receives_broadcast_state_update ____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of test_unpublish_event_closes_the_connection _________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_overlays_ws_route_resolves_on_the_real_mounted_application _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_no_collision_with_the_existing_broadcast_route _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_sessions_ws_route_resolves_on_the_real_mounted_application _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_rejects_connection_without_auth ____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_code_token_for_a_different_session_is_rejected _____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_url_project_id_not_matching_the_sessions_real_project_is_rejected _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of test_a_control_purpose_token_cannot_open_the_read_ws ____ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of test_valid_read_token_connects_and_receives_resolved_state _ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_owner_can_connect_to_their_own_unpublished_session ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of test_non_owner_cannot_connect_to_an_unpublished_session ___ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_receives_broadcast_state_update ____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of test_deletion_closes_the_connection _____________ self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = @contextmanager def _nodb_cursor(self): cursor = None try: > with super()._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:712: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=postgres client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'postgres', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError During handling of the above exception, another exception occurred: self = @async_unsafe def ensure_connection(self): """Guarantee that a connection to the database is established.""" if self.connection is None: if self.in_atomic_block and self.closed_in_transaction: raise ProgrammingError( "Cannot open a new connection in an atomic block." ) with self.wrap_database_errors: > self.connect() /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E psycopg2.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = def setup(self) -> None: runner_fixture_id = f"_{self._loop_scope}_scoped_runner" if runner_fixture_id not in self.fixturenames: self.fixturenames.append(runner_fixture_id) # When loop factories are configured, resolve the loop factory # fixture early so that a factory variant change cascades cache # invalidation before any async fixture checks its cache. hook_caller = self.config.hook.pytest_asyncio_loop_factories if hook_caller.get_hookimpls(): _ = self._request.getfixturevalue(_asyncio_loop_factory.__name__) > return super().setup() ^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.12/site-packages/pytest_asyncio/plugin.py:926: in pytest_fixture_setup return (yield) ^^^^^ /usr/local/lib/python3.12/site-packages/pytest_django/plugin.py:566: in _django_db_marker request.getfixturevalue("_django_db_helper") /usr/local/lib/python3.12/site-packages/pytest_django/fixtures.py:186: in django_db_setup db_cfg = setup_databases( /usr/local/lib/python3.12/site-packages/django/test/utils.py:207: in setup_databases connection.creation.create_test_db( /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:69: in create_test_db self._create_test_db(verbosity, autoclobber, keepdb) /usr/local/lib/python3.12/site-packages/django/db/backends/base/creation.py:221: in _create_test_db with self._nodb_cursor() as cursor: ^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:534: in _nodb_cursor with conn.cursor() as cursor: ^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:320: in cursor return self._cursor() ^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:296: in _cursor self.ensure_connection() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:278: in ensure_connection with self.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/utils.py:94: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:279: in ensure_connection self.connect() /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py:256: in connect self.connection = self.get_new_connection(conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/utils/asyncio.py:26: in inner return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:333: in get_new_connection connection = self.Database.connect(**conn_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'dbname=sink client_encoding=UTF8 user=postgres password=1q2w3e host=db_ram port=5432' connection_factory = None, cursor_factory = kwargs = {'dbname': 'sink', 'client_encoding': 'UTF8', 'user': 'postgres', 'password': '1q2w3e', ...} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E django.db.utils.OperationalError: could not translate host name "db_ram" to address: Temporary failure in name resolution /usr/local/lib/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError =============================== warnings summary =============================== ../usr/local/lib/python3.12/site-packages/channels/http.py:1 /usr/local/lib/python3.12/site-packages/channels/http.py:1: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13 import cgi ../usr/local/lib/python3.12/site-packages/lark/utils.py:150 /usr/local/lib/python3.12/site-packages/lark/utils.py:150: DeprecationWarning: module 'sre_parse' is deprecated import sre_parse ../usr/local/lib/python3.12/site-packages/lark/utils.py:151 /usr/local/lib/python3.12/site-packages/lark/utils.py:151: DeprecationWarning: module 'sre_constants' is deprecated import sre_constants tests/assets/api/test_views.py::test_upload_logo /usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:513: RuntimeWarning: Normally Django will use a connection to the 'postgres' database to avoid running initialization queries against the production database when it's not needed (for example, when running tests). Django was unable to create a connection to the 'postgres' database and will use the first PostgreSQL database instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ ERROR tests/assets/api/test_views.py::test_upload_logo - django.db.utils.Oper... ERROR tests/assets/api/test_views.py::test_upload_sets_owner_from_jwt - djang... ERROR tests/assets/api/test_views.py::test_upload_requires_auth - django.db.u... ERROR tests/assets/api/test_views.py::test_list_returns_only_own_account_assets ERROR tests/assets/api/test_views.py::test_rql_filter_by_type - django.db.uti... ERROR tests/assets/api/test_views.py::test_rql_filter_by_is_default - django.... ERROR tests/assets/api/test_views.py::test_delete_asset - django.db.utils.Ope... ERROR tests/assets/api/test_views.py::test_delete_asset_cascades_to_its_composition_source ERROR tests/assets/api/test_views.py::test_delete_other_account_asset_not_found ERROR tests/assets/services/test_defaults.py::test_seed_creates_default_assets_for_account ERROR tests/assets/services/test_defaults.py::test_seed_sets_correct_types - ... ERROR tests/assets/services/test_defaults.py::test_seed_is_idempotent - djang... ERROR tests/assets/services/test_defaults.py::test_seed_on_account_cqrs_created ERROR tests/assets/test_models.py::test_broadcast_asset_creation - django.db.... ERROR tests/assets/test_models.py::test_broadcast_asset_video_has_duration - ... ERROR tests/assets/test_models.py::test_seeded_default_asset_has_flag - djang... ERROR tests/assets/test_models.py::test_user_created_asset_not_default_by_default ERROR tests/assets/test_models.py::test_asset_str - django.db.utils.Operation... ERROR tests/assets/test_models.py::test_asset_uuid_primary_key - django.db.ut... ERROR tests/assets/test_models.py::test_asset_owner_required - django.db.util... ERROR tests/capturer/test_overlay_service.py::test_validate_interactive_overlay_creates_session ERROR tests/capturer/test_overlay_service.py::test_validate_interactive_overlay_rejects_while_already_validating ERROR tests/capturer/test_overlay_service.py::test_validate_interactive_overlay_rejects_while_running ERROR tests/capturer/test_overlay_service.py::test_validate_interactive_overlay_allows_stopped ERROR tests/capturer/test_overlay_service.py::test_validate_interactive_overlay_creates_new_session_when_previous_errored ERROR tests/capturer/test_overlay_service.py::test_start_browser_overlay_dispatches_capturer_run_with_source_id ERROR tests/capturer/test_overlay_service.py::test_stop_browser_overlay_sends_stop_when_activating ERROR tests/capturer/test_overlay_service.py::test_stop_browser_overlay_noop_when_no_session ERROR tests/capturer/test_tasks.py::test_validate_transitions_to_valid_on_success ERROR tests/capturer/test_tasks.py::test_validate_transitions_to_error_on_navigation_failure ERROR tests/capturer/test_tasks.py::test_validate_cleanup_always_runs - djang... ERROR tests/capturer/test_tasks.py::test_validate_nonexistent_session_is_no_op ERROR tests/capturer/test_tasks.py::test_validate_wrong_status_is_no_op - dja... ERROR tests/capturer/test_tasks.py::test_validate_success_starts_browser_overlay ERROR tests/capturer/test_tasks.py::test_validate_failure_does_not_start_browser_overlay ERROR tests/capturer/test_tasks.py::test_run_transitions_to_activating_then_stops ERROR tests/capturer/test_tasks.py::test_run_transitions_to_error_when_gst_push_fails ERROR tests/capturer/test_tasks.py::test_run_transitions_to_error_when_jwt_missing ERROR tests/capturer/test_tasks.py::test_run_accepts_stopped_session_for_reactivation ERROR tests/capturer/test_tasks.py::test_run_publishes_to_overlays_path - dja... ERROR tests/capturer/test_tasks.py::test_run_crash_deactivates_source_and_notifies_compositor ERROR tests/capturer/test_tasks.py::test_run_clean_stop_does_not_notify_compositor ERROR tests/capturer/test_tasks.py::test_check_overlay_activation_timeout_unwinds_when_still_activating ERROR tests/capturer/test_tasks.py::test_check_overlay_activation_timeout_noop_when_already_running ERROR tests/common/test_commands.py::test_fixturing_assets_command_creates_defaults_for_all_accounts ERROR tests/common/test_commands.py::test_fixturing_assets_command_is_idempotent ERROR tests/compositor/api/test_views.py::test_create_composition - django.db... ERROR tests/compositor/api/test_views.py::test_create_composition_then_attach_streams ERROR tests/compositor/api/test_views.py::test_add_source_cross_account_rejected ERROR tests/compositor/api/test_views.py::test_list_compositions - django.db.... ERROR tests/compositor/api/test_views.py::test_rql_filter_by_installation_id ERROR tests/compositor/api/test_views.py::test_publish_composition_defaults_to_live ERROR tests/compositor/api/test_views.py::test_publish_composition_to_preview ERROR tests/compositor/api/test_views.py::test_publish_composition_rejects_already_live ERROR tests/compositor/api/test_views.py::test_apply_updates_requires_published_composition ERROR tests/compositor/api/test_views.py::test_apply_updates_after_publish - ... ERROR tests/compositor/api/test_views.py::test_stop_composition - django.db.u... ERROR tests/compositor/api/test_views.py::test_switch_slot - django.db.utils.... ERROR tests/compositor/api/test_views.py::test_switch_slot_invalid_returns_400 ERROR tests/compositor/api/test_views.py::test_create_scene_via_api - django.... ERROR tests/compositor/api/test_views.py::test_delete_scene_via_api - django.... ERROR tests/compositor/api/test_views.py::test_delete_active_scene_via_api_rejected ERROR tests/compositor/api/test_views.py::test_reposition_source_moves_scene_via_api ERROR tests/compositor/api/test_views.py::test_create_scene_preset_via_api - ... ERROR tests/compositor/api/test_views.py::test_list_scene_presets_via_api - d... ERROR tests/compositor/api/test_views.py::test_update_scene_preset_via_api - ... ERROR tests/compositor/api/test_views.py::test_delete_scene_preset_via_api - ... ERROR tests/compositor/api/test_views.py::test_fire_scene_preset_via_api - dj... ERROR tests/compositor/api/test_views.py::test_delete_scene_referenced_by_preset_rejected_via_api ERROR tests/compositor/api/test_views.py::test_switch_scene_with_auto_return_via_api ERROR tests/compositor/api/test_views.py::test_delete_stopped_composition - d... ERROR tests/compositor/api/test_views.py::test_delete_active_composition_rejected ERROR tests/compositor/api/test_views.py::test_delete_composition_with_sources_cascades ERROR tests/compositor/api/test_views.py::test_composition_requires_auth - dj... ERROR tests/compositor/api/test_views.py::test_composition_retrieve_allowed_for_user_context ERROR tests/compositor/api/test_views.py::test_composition_retrieve_allowed_for_module_context_same_account ERROR tests/compositor/api/test_views.py::test_composition_retrieve_404s_for_module_context_different_account ERROR tests/compositor/api/test_views.py::test_add_controller_stream_source_creates_fresh_row ERROR tests/compositor/api/test_views.py::test_add_composition_source_explicit_is_visible_false_is_honored ERROR tests/compositor/api/test_views.py::test_add_controller_stream_source_same_stream_to_two_compositions ERROR tests/compositor/api/test_views.py::test_add_controller_stream_source_requires_stream_reference ERROR tests/compositor/api/test_views.py::test_add_controller_stream_source_rejects_non_transmitting_stream ERROR tests/compositor/api/test_views.py::test_composition_sources_list - dja... ERROR tests/compositor/api/test_views.py::test_composition_sources_list_includes_removed_by_default ERROR tests/compositor/api/test_views.py::test_composition_sources_list_rql_excludes_removed ERROR tests/compositor/api/test_views.py::test_composition_sources_retrieve ERROR tests/compositor/api/test_views.py::test_reposition_composition_source ERROR tests/compositor/api/test_views.py::test_reposition_never_dispatches - ... ERROR tests/compositor/api/test_views.py::test_remove_composition_source_never_attached_still_soft_removes ERROR tests/compositor/api/test_views.py::test_remove_composition_source_attached_soft_removes ERROR tests/compositor/api/test_views.py::test_delete_composition_source_succeeds_while_draft ERROR tests/compositor/api/test_views.py::test_delete_composition_source_fails_once_published[preview] ERROR tests/compositor/api/test_views.py::test_delete_composition_source_fails_once_published[live] ERROR tests/compositor/api/test_views.py::test_composition_sources_not_visible_to_other_account ERROR tests/compositor/api/test_views.py::test_copy_composition_source_to_scenes ERROR tests/compositor/api/test_views.py::test_copy_composition_source_requires_at_least_one_scene ERROR tests/compositor/services/test_events.py::test_terminal_status_soft_removes_attached_source ERROR tests/compositor/services/test_events.py::test_terminal_status_skips_draft_composition ERROR tests/compositor/services/test_events.py::test_terminal_status_skips_ended_composition ERROR tests/compositor/services/test_events.py::test_terminal_status_skips_already_unattached_source ERROR tests/compositor/services/test_events.py::test_terminal_status_skips_already_removed_source ERROR tests/compositor/services/test_events.py::test_terminal_status_covers_every_composition_holding_the_stream ERROR tests/compositor/services/test_events.py::test_transmitting_flags_need_update_for_unattached_source ERROR tests/compositor/services/test_events.py::test_transmitting_skips_draft_composition ERROR tests/compositor/services/test_events.py::test_transmitting_skips_already_attached_source ERROR tests/compositor/services/test_events.py::test_transmitting_skips_removed_source ERROR tests/compositor/services/test_events.py::test_transmitting_does_not_reflag_already_flagged_composition ERROR tests/compositor/services/test_events.py::test_transmitting_with_no_composition_source_is_a_noop ERROR tests/compositor/services/test_events.py::test_other_status_transitions_are_a_noop ERROR tests/compositor/services/test_lifecycle.py::test_create_composition - ... ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_controller_stream_cross_account_rejected ERROR tests/compositor/services/test_lifecycle.py::test_publish_from_draft_to_live_sets_target_phase_pending_confirmation ERROR tests/compositor/services/test_lifecycle.py::test_publish_from_draft_to_preview_sets_target_phase_pending_confirmation ERROR tests/compositor/services/test_lifecycle.py::test_publish_confirmed_preview_to_live_does_not_restart_pipeline ERROR tests/compositor/services/test_lifecycle.py::test_first_publish_reveals_active_slot_source ERROR tests/compositor/services/test_lifecycle.py::test_first_publish_does_not_hide_non_slotted_sources_sharing_the_active_scene ERROR tests/compositor/services/test_lifecycle.py::test_first_publish_reveals_configured_active_slot ERROR tests/compositor/services/test_lifecycle.py::test_reconfirmed_publish_does_not_reclobber_visibility ERROR tests/compositor/services/test_lifecycle.py::test_publish_rejects_preview_to_preview ERROR tests/compositor/services/test_lifecycle.py::test_publish_rejects_already_live ERROR tests/compositor/services/test_lifecycle.py::test_publish_rejects_ended_composition ERROR tests/compositor/services/test_lifecycle.py::test_apply_updates_rejects_draft_composition ERROR tests/compositor/services/test_lifecycle.py::test_stop_composition_sends_command ERROR tests/compositor/services/test_lifecycle.py::test_stop_composition_updates_broadcast_state_phase ERROR tests/compositor/services/test_lifecycle.py::test_switch_slot_sends_command ERROR tests/compositor/services/test_lifecycle.py::test_switch_slot_invalid_slot_raises ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_controller_stream ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_controller_stream_reusable_across_compositions ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_controller_stream_requires_stream_id ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_controller_stream_requires_slot ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_controller_stream_requires_transmitting_stream ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_controller_stream_updates_transform_fields ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_controller_stream_never_dispatches ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_asset ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_asset_requires_asset_id ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_image_url ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_image_url_rejects_html_content ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_interactive_rejects_private_url ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_url_required_for_image_url ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_rejects_unsupported_type ERROR tests/compositor/services/test_lifecycle.py::test_validate_composition_source_rejects_non_interactive ERROR tests/compositor/services/test_lifecycle.py::test_validate_composition_source_dispatches_for_interactive ERROR tests/compositor/services/test_lifecycle.py::test_reposition_composition_source_updates_transform_fields ERROR tests/compositor/services/test_lifecycle.py::test_reposition_composition_source_never_dispatches ERROR tests/compositor/services/test_lifecycle.py::test_reposition_composition_source_flags_need_update_when_live ERROR tests/compositor/services/test_lifecycle.py::test_reposition_composition_source_moves_to_another_scene ERROR tests/compositor/services/test_lifecycle.py::test_reposition_composition_source_moving_scene_never_dispatches ERROR tests/compositor/services/test_lifecycle.py::test_reposition_composition_source_rejects_scene_from_another_composition ERROR tests/compositor/services/test_lifecycle.py::test_remove_composition_source_never_attached_still_soft_removes ERROR tests/compositor/services/test_lifecycle.py::test_remove_composition_source_frees_its_slot_for_reuse ERROR tests/compositor/services/test_lifecycle.py::test_remove_composition_source_attached_soft_removes ERROR tests/compositor/services/test_lifecycle.py::test_remove_composition_source_interactive_stops_browser_overlay ERROR tests/compositor/services/test_lifecycle.py::test_remove_composition_source_interactive_copy_cascades_to_whole_group ERROR tests/compositor/services/test_lifecycle.py::test_remove_composition_source_interactive_no_copies_reduces_to_single_row ERROR tests/compositor/services/test_lifecycle.py::test_remove_composition_source_interactive_cascade_leaves_already_removed_copies_untouched ERROR tests/compositor/services/test_lifecycle.py::test_delete_composition_source_hard_deletes_while_draft ERROR tests/compositor/services/test_lifecycle.py::test_delete_composition_source_raises_once_published[preview] ERROR tests/compositor/services/test_lifecycle.py::test_delete_composition_source_raises_once_published[live] ERROR tests/compositor/services/test_lifecycle.py::test_delete_composition_source_interactive_stops_browser_overlay ERROR tests/compositor/services/test_lifecycle.py::test_remove_composition_source_flags_need_update_when_live ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_flags_need_update_when_composition_live ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_does_not_flag_need_update_for_draft_composition ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_source_controller_stream_does_not_flag_need_update_when_draft ERROR tests/compositor/services/test_lifecycle.py::test_composition_updater_marks_attached_without_dispatch_when_pipeline_not_running ERROR tests/compositor/services/test_lifecycle.py::test_composition_updater_dispatches_add_when_pipeline_running ERROR tests/compositor/services/test_lifecycle.py::test_composition_updater_dispatches_remove_and_keeps_history ERROR tests/compositor/services/test_lifecycle.py::test_composition_updater_does_not_redispatch_an_already_processed_removal ERROR tests/compositor/services/test_lifecycle.py::test_composition_updater_dispatches_interactive_when_capture_session_running ERROR tests/compositor/services/test_lifecycle.py::test_composition_updater_rejects_not_ready_interactive_source ERROR tests/compositor/services/test_lifecycle.py::test_composition_updater_treats_a_copy_ready_when_its_root_session_is_running ERROR tests/compositor/services/test_lifecycle.py::test_composition_updater_no_partial_dispatch ERROR tests/compositor/services/test_lifecycle.py::test_composition_updater_clears_need_update ERROR tests/compositor/services/test_lifecycle.py::test_composition_updater_dispatches_transform_for_already_attached_source ERROR tests/compositor/services/test_lifecycle.py::test_composition_updater_does_not_double_dispatch_transform_for_newly_attached_source ERROR tests/compositor/services/test_lifecycle.py::test_attach_ready_overlay_source_does_not_touch_other_sources ERROR tests/compositor/services/test_lifecycle.py::test_attach_ready_overlay_source_does_not_clear_need_update ERROR tests/compositor/services/test_lifecycle.py::test_attach_ready_overlay_source_noop_if_already_attached ERROR tests/compositor/services/test_lifecycle.py::test_create_composition_auto_creates_default_scene_and_sets_active ERROR tests/compositor/services/test_lifecycle.py::test_create_scene_adds_an_additional_scene ERROR tests/compositor/services/test_lifecycle.py::test_update_scene_renames_and_reorders ERROR tests/compositor/services/test_lifecycle.py::test_update_scene_partial_update_leaves_omitted_field_untouched ERROR tests/compositor/services/test_lifecycle.py::test_delete_scene_soft_removes_its_sources_and_the_scene_itself ERROR tests/compositor/services/test_lifecycle.py::test_delete_scene_stops_interactive_browser_overlay_first ERROR tests/compositor/services/test_lifecycle.py::test_delete_scene_rejects_the_active_scene ERROR tests/compositor/services/test_lifecycle.py::test_delete_scene_rejects_the_last_remaining_scene ERROR tests/compositor/services/test_lifecycle.py::test_delete_scene_leaves_already_removed_sources_untouched ERROR tests/compositor/services/test_lifecycle.py::test_deleted_scene_rejects_new_sources_and_switches ERROR tests/compositor/services/test_lifecycle.py::test_delete_scene_rejects_when_referenced_by_a_preset_as_primary_scene ERROR tests/compositor/services/test_lifecycle.py::test_delete_scene_rejects_when_referenced_by_a_preset_as_auto_return_scene ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_updates_active_scene_immediately_even_without_a_running_pipeline ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_dispatches_command_when_pipeline_running ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_per_call_overrides_take_precedence_over_composition_defaults ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_rejects_scene_from_another_composition ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_validates_interactive_source_with_no_session ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_starts_interactive_source_with_valid_session_directly ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_does_not_touch_interactive_source_already_running_or_in_flight[running] ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_does_not_touch_interactive_source_already_running_or_in_flight[validating] ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_does_not_touch_interactive_source_already_running_or_in_flight[activating] ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_entering_a_copys_scene_starts_the_governing_root_not_the_copy ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_never_stops_interactive_sources_leaving_the_old_scene ERROR tests/compositor/services/test_lifecycle.py::test_bump_auto_return_generation_increments_and_returns_actual_value ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_bumps_generation_even_without_auto_return ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_schedules_apply_scene_auto_return_when_given ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_auto_return_falls_back_to_default_transition ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_without_auto_return_does_not_schedule_anything ERROR tests/compositor/services/test_lifecycle.py::test_create_scene_preset_minimal ERROR tests/compositor/services/test_lifecycle.py::test_create_scene_preset_with_auto_return ERROR tests/compositor/services/test_lifecycle.py::test_create_scene_preset_rejects_scene_from_another_composition ERROR tests/compositor/services/test_lifecycle.py::test_scenepreset_check_constraint_rejects_partial_auto_return ERROR tests/compositor/services/test_lifecycle.py::test_update_scene_preset_partial_update_leaves_auto_return_untouched ERROR tests/compositor/services/test_lifecycle.py::test_update_scene_preset_clears_auto_return_when_explicitly_none ERROR tests/compositor/services/test_lifecycle.py::test_update_scene_preset_sets_auto_return_wholesale ERROR tests/compositor/services/test_lifecycle.py::test_delete_scene_preset_hard_deletes ERROR tests/compositor/services/test_lifecycle.py::test_delete_composition_with_scene_preset_cascades ERROR tests/compositor/services/test_lifecycle.py::test_fire_scene_preset_performs_the_configured_switch ERROR tests/compositor/services/test_lifecycle.py::test_fire_scene_preset_with_auto_return_schedules_the_return ERROR tests/compositor/services/test_lifecycle.py::test_fire_scene_preset_already_active_scene_still_arms_a_fresh_timer ERROR tests/compositor/services/test_lifecycle.py::test_new_controller_stream_source_in_a_scene_created_after_first_publish_is_visible_immediately ERROR tests/compositor/services/test_lifecycle.py::test_new_controller_stream_source_on_a_draft_composition_is_visible_immediately ERROR tests/compositor/services/test_lifecycle.py::test_copy_composition_source_creates_independent_rows_per_scene ERROR tests/compositor/services/test_lifecycle.py::test_copy_composition_source_does_not_copy_capture_session ERROR tests/compositor/services/test_lifecycle.py::test_copy_composition_source_sets_parent_source_to_the_root ERROR tests/compositor/services/test_lifecycle.py::test_copy_composition_source_copying_a_copy_resolves_to_the_original_root ERROR tests/compositor/services/test_lifecycle.py::test_copy_composition_source_non_interactive_never_sets_parent_source ERROR tests/compositor/services/test_lifecycle.py::test_copy_composition_source_requires_at_least_one_scene ERROR tests/compositor/services/test_lifecycle.py::test_copy_composition_source_rejects_scene_from_another_composition ERROR tests/compositor/test_models.py::test_controller_stream_source_is_valid ERROR tests/compositor/test_models.py::test_controller_stream_source_requires_composition ERROR tests/compositor/test_models.py::test_controller_stream_source_requires_slot ERROR tests/compositor/test_models.py::test_asset_source_requires_composition ERROR tests/compositor/test_tasks.py::test_run_compositor_stops_cleanly_on_stop_command ERROR tests/compositor/test_tasks.py::test_run_compositor_recalculates_latency_on_latency_message ERROR tests/compositor/test_tasks.py::test_run_compositor_connects_raw_queue_overrun_logger ERROR tests/compositor/test_tasks.py::test_run_compositor_exits_on_bus_error ERROR tests/compositor/test_tasks.py::test_run_compositor_removes_overlay_on_overlay_source_error ERROR tests/compositor/test_tasks.py::test_run_compositor_removes_source_on_source_error ERROR tests/compositor/test_tasks.py::test_run_compositor_isolates_decoder_error_not_just_connection_error ERROR tests/compositor/test_tasks.py::test_run_compositor_skips_retry_when_chain_already_in_flight ERROR tests/compositor/test_tasks.py::test_run_compositor_pipeline_failure_exits_immediately ERROR tests/compositor/test_tasks.py::test_run_compositor_clears_task_id_on_normal_exit ERROR tests/compositor/test_tasks.py::test_run_compositor_clears_output_live_on_normal_exit ERROR tests/compositor/test_tasks.py::test_run_compositor_clears_output_live_on_pipeline_failure ERROR tests/compositor/test_tasks.py::test_run_compositor_persists_output_live_transition ERROR tests/compositor/test_tasks.py::test_run_compositor_fails_composition_when_output_never_connects_in_time ERROR tests/compositor/test_tasks.py::test_run_compositor_does_not_fail_composition_on_a_quick_reconnect ERROR tests/compositor/test_tasks.py::test_run_compositor_fails_composition_when_reconnect_never_completes ERROR tests/compositor/test_tasks.py::test_run_compositor_attaches_existing_sources_on_start ERROR tests/compositor/test_tasks.py::test_run_compositor_switch_slot_command ERROR tests/compositor/test_tasks.py::test_handle_switch_slot_forces_encoder_keyframe ERROR tests/compositor/test_tasks.py::test_handle_switch_scene_cut_forces_encoder_keyframe ERROR tests/compositor/test_tasks.py::test_handle_switch_scene_fade_does_not_force_encoder_keyframe ERROR tests/compositor/test_tasks.py::test_handle_switch_scene_computes_effective_visibility_and_toggles ERROR tests/compositor/test_tasks.py::test_handle_switch_scene_toggles_interactive_sources_like_any_other_overlay ERROR tests/compositor/test_tasks.py::test_start_composition_task_stores_celery_task_id ERROR tests/compositor/test_tasks.py::test_start_composition_task_exits_when_output_auth_fails ERROR tests/compositor/test_tasks.py::test_start_composition_task_noop_when_composition_missing ERROR tests/compositor/test_tasks.py::test_retry_add_source_sends_add_source_command ERROR tests/compositor/test_tasks.py::test_retry_add_source_reschedules_itself ERROR tests/compositor/test_tasks.py::test_retry_add_source_stops_after_max_attempts ERROR tests/compositor/test_tasks.py::test_retry_add_source_noop_when_source_deleted ERROR tests/compositor/test_tasks.py::test_handle_set_source_visibility_dispatches_to_dispatcher ERROR tests/compositor/test_tasks.py::test_handle_set_source_visibility_noop_when_source_deleted ERROR tests/compositor/test_tasks.py::test_handle_set_source_visibility_defaults_omitted_keys_to_db_state ERROR tests/compositor/test_tasks.py::test_handle_set_source_visibility_persists_db_state ERROR tests/compositor/test_tasks.py::test_attach_initial_sources_adds_running_interactive_overlay ERROR tests/compositor/test_tasks.py::test_attach_initial_sources_skips_interactive_overlay_not_yet_running ERROR tests/compositor/test_tasks.py::test_apply_scene_auto_return_noop_when_composition_not_found ERROR tests/compositor/test_tasks.py::test_apply_scene_auto_return_noop_on_stale_generation ERROR tests/compositor/test_tasks.py::test_apply_scene_auto_return_calls_switch_scene_on_matching_generation ERROR tests/compositor/test_tasks.py::test_apply_scene_auto_return_handles_deleted_target_scene_as_noop ERROR tests/compositor/test_tasks.py::test_apply_scene_auto_return_end_to_end_with_real_switch_scene ERROR tests/compositor/test_tasks.py::test_apply_scene_auto_return_does_not_rearm_a_further_auto_return ERROR tests/overlays/api/test_pack_sessions.py::test_returns_empty_for_module_authenticated_callers ERROR tests/overlays/api/test_pack_sessions.py::test_returns_only_the_callers_own_sessions_in_the_pack ERROR tests/overlays/api/test_pack_sessions.py::test_returns_every_session_across_the_callers_own_matching_projects ERROR tests/overlays/api/test_pack_sessions.py::test_excludes_sessions_from_a_different_pack ERROR tests/overlays/api/test_pack_sessions.py::test_each_item_includes_its_parent_project_id ERROR tests/overlays/api/test_pack_sessions.py::test_nonexistent_pack_id_404s ERROR tests/overlays/api/test_pack_sessions.py::test_invalid_pack_id_404s_not_500 ERROR tests/overlays/api/test_pack_sessions.py::test_nonexistent_pack_id_404s_even_for_a_module_authenticated_caller ERROR tests/overlays/api/test_pack_sessions.py::test_excludes_non_interactive_projects_even_if_templated_in_the_pack ERROR tests/overlays/api/test_project_control.py::test_control_rejects_custom_canvas_project ERROR tests/overlays/api/test_project_control.py::test_control_rejects_non_owner ERROR tests/overlays/api/test_project_control.py::test_valid_control_persists_and_broadcasts ERROR tests/overlays/api/test_project_control.py::test_invalid_control_does_not_broadcast ERROR tests/overlays/api/test_project_create.py::test_create_requires_auth - ... ERROR tests/overlays/api/test_project_create.py::test_premium_account_creates_a_blank_custom_canvas_project ERROR tests/overlays/api/test_project_create.py::test_free_account_creating_custom_canvas_is_rejected ERROR tests/overlays/api/test_project_create.py::test_free_account_instantiates_a_free_template ERROR tests/overlays/api/test_project_create.py::test_template_controlled_without_a_template_returns_400_not_500 ERROR tests/overlays/api/test_project_create.py::test_create_wires_a_valid_automatic_subscription ERROR tests/overlays/api/test_project_create.py::test_create_rejects_a_cross_pack_subscription_with_400 ERROR tests/overlays/api/test_project_create.py::test_create_without_subscription_fields_defaults_to_manual ERROR tests/overlays/api/test_project_list.py::test_list_returns_only_own_projects ERROR tests/overlays/api/test_project_list.py::test_retrieve_someone_elses_project_404s_not_403 ERROR tests/overlays/api/test_project_list.py::test_module_only_call_cannot_list_projects ERROR tests/overlays/api/test_project_list.py::test_list_excludes_a_teammates_interactive_project ERROR tests/overlays/api/test_project_list.py::test_retrieve_a_teammates_interactive_project_404s ERROR tests/overlays/api/test_project_list.py::test_list_still_includes_the_callers_own_interactive_project ERROR tests/overlays/api/test_project_list.py::test_list_excludes_an_anonymous_interactive_project_for_any_user_session ERROR tests/overlays/api/test_project_list.py::test_list_still_shares_non_interactive_projects_across_the_same_account ERROR tests/overlays/api/test_project_publish.py::test_publish_sets_is_published_true ERROR tests/overlays/api/test_project_publish.py::test_publish_is_idempotent ERROR tests/overlays/api/test_project_publish.py::test_publish_non_owner_404s ERROR tests/overlays/api/test_project_publish.py::test_unpublish_sets_is_published_false_and_broadcasts_close ERROR tests/overlays/api/test_project_sessions.py::test_owner_can_add_a_session_when_premium ERROR tests/overlays/api/test_project_sessions.py::test_owner_cannot_add_a_session_when_not_premium ERROR tests/overlays/api/test_project_sessions.py::test_non_owner_cannot_add_a_session ERROR tests/overlays/api/test_project_sessions.py::test_module_auth_cannot_add_a_session ERROR tests/overlays/api/test_project_sessions.py::test_module_call_lists_a_projects_one_session ERROR tests/overlays/api/test_project_sessions.py::test_module_call_against_a_nonexistent_project_404s ERROR tests/overlays/api/test_project_sessions.py::test_owner_can_list_their_own_sessions ERROR tests/overlays/api/test_project_sessions.py::test_non_owner_user_session_cannot_list_a_different_accounts_sessions ERROR tests/overlays/api/test_project_sessions.py::test_a_different_user_of_the_same_account_cannot_list_anothers_sessions ERROR tests/overlays/api/test_project_sessions.py::test_code_token_cannot_list_sessions ERROR tests/overlays/api/test_project_sessions.py::test_owner_can_retrieve_their_own_session ERROR tests/overlays/api/test_project_sessions.py::test_retrieve_exposes_sync_mode_and_subscribed_session ERROR tests/overlays/api/test_project_sessions.py::test_retrieve_exposes_null_subscribed_session_for_a_manual_session ERROR tests/overlays/api/test_project_sessions.py::test_non_owner_cannot_retrieve_a_session ERROR tests/overlays/api/test_project_sessions.py::test_a_control_code_token_can_retrieve_its_own_session ERROR tests/overlays/api/test_project_sessions.py::test_a_read_code_token_cannot_retrieve_session_metadata ERROR tests/overlays/api/test_project_sessions.py::test_module_call_returns_manual_sync_mode_and_null_subscribed_session ERROR tests/overlays/api/test_project_sessions.py::test_module_call_returns_automatic_sync_mode_and_the_subscribed_session ERROR tests/overlays/api/test_project_sessions.py::test_module_call_against_an_unpublished_session_404s_on_subscription_too ERROR tests/overlays/api/test_project_sessions.py::test_module_call_returns_a_published_sessions_config ERROR tests/overlays/api/test_project_sessions.py::test_module_call_against_unpublished_session_404s ERROR tests/overlays/api/test_project_sessions.py::test_owner_sees_their_own_unpublished_session ERROR tests/overlays/api/test_project_sessions.py::test_non_owner_user_session_cannot_see_an_unpublished_session ERROR tests/overlays/api/test_project_sessions.py::test_a_read_code_token_can_render_a_published_session ERROR tests/overlays/api/test_project_sessions.py::test_module_call_against_an_expired_anonymous_session_403s ERROR tests/overlays/api/test_project_sessions.py::test_a_premium_logged_in_owners_session_is_never_expired_even_if_old ERROR tests/overlays/api/test_project_sessions.py::test_a_non_premium_logged_in_owners_old_session_is_expired ERROR tests/overlays/api/test_project_sessions.py::test_owner_can_push_state_and_it_broadcasts ERROR tests/overlays/api/test_project_sessions.py::test_non_owner_user_session_cannot_push_state ERROR tests/overlays/api/test_project_sessions.py::test_a_control_code_token_can_push_state_for_its_own_session ERROR tests/overlays/api/test_project_sessions.py::test_a_control_code_token_cannot_push_state_to_a_different_session ERROR tests/overlays/api/test_project_sessions.py::test_a_read_code_token_cannot_push_state ERROR tests/overlays/api/test_project_sessions.py::test_expired_anonymous_session_rejects_a_write ERROR tests/overlays/api/test_project_sessions.py::test_owner_can_delete_an_additional_output ERROR tests/overlays/api/test_project_sessions.py::test_owner_cannot_delete_a_projects_only_remaining_output ERROR tests/overlays/api/test_project_sessions.py::test_non_owner_cannot_delete_a_session ERROR tests/overlays/api/test_project_sessions.py::test_a_control_code_token_cannot_delete_a_session ERROR tests/overlays/api/test_project_update.py::test_premium_account_can_put_their_custom_canvas_project ERROR tests/overlays/api/test_project_update.py::test_downgrading_after_creation_blocks_the_very_next_put ERROR tests/overlays/api/test_project_update.py::test_put_rejects_a_template_controlled_project ERROR tests/overlays/api/test_project_update.py::test_put_cannot_change_mode_or_template ERROR tests/overlays/api/test_render.py::test_module_call_against_unpublished_project_404s ERROR tests/overlays/api/test_render.py::test_module_call_against_published_project_returns_resolved_config ERROR tests/overlays/api/test_render.py::test_owner_sees_own_unpublished_draft_via_user_session ERROR tests/overlays/api/test_render.py::test_non_owner_user_session_cannot_see_unpublished_draft ERROR tests/overlays/api/test_render.py::test_template_controlled_project_merges_overrides_onto_template_config ERROR tests/overlays/api/test_views.py::test_list_requires_auth - django.db.u... ERROR tests/overlays/api/test_views.py::test_list_rejects_user_session_auth ERROR tests/overlays/api/test_views.py::test_list_allows_module_auth - django... ERROR tests/overlays/api/test_views.py::test_list_exposes_description_for_the_gallery_dialog ERROR tests/overlays/api/test_views.py::test_list_exposes_interactive_defaults_null_by_default ERROR tests/overlays/api/test_views.py::test_list_exposes_interactive_defaults_when_set ERROR tests/overlays/api/test_views.py::test_list_exposes_pack_null_by_default ERROR tests/overlays/api/test_views.py::test_list_exposes_pack_reference_when_set ERROR tests/overlays/api/test_views.py::test_list_never_returns_inactive_templates ERROR tests/overlays/api/test_views.py::test_retrieve_inactive_template_404s ERROR tests/overlays/api/test_views.py::test_rql_filter_by_category - django.... ERROR tests/overlays/api/test_views.py::test_rql_filter_by_pack - django.db.u... ERROR tests/overlays/api/test_views.py::test_rql_filter_disallows_relation_traversal ERROR tests/overlays/services/test_account_overlay_plan.py::test_creates_a_plan_at_the_given_tier_when_none_exists ERROR tests/overlays/services/test_account_overlay_plan.py::test_upgrades_an_existing_free_plan_to_the_given_tier ERROR tests/overlays/services/test_control.py::test_rejects_a_path_not_in_control_fields ERROR tests/overlays/services/test_control.py::test_rejects_a_text_value_exceeding_max_length ERROR tests/overlays/services/test_control.py::test_rejects_non_string_for_text_field ERROR tests/overlays/services/test_control.py::test_rejects_string_list_exceeding_max_items ERROR tests/overlays/services/test_control.py::test_rejects_non_list_for_string_list_field ERROR tests/overlays/services/test_control.py::test_rejects_unparseable_datetime ERROR tests/overlays/services/test_control.py::test_accepts_valid_iso_datetime ERROR tests/overlays/services/test_control.py::test_rejects_empty_color - dja... ERROR tests/overlays/services/test_control.py::test_valid_subset_merges_and_only_those_keys_change ERROR tests/overlays/services/test_control.py::test_no_partial_merge_when_one_of_several_paths_is_invalid ERROR tests/overlays/services/test_control.py::test_accepts_a_counter_value_within_range ERROR tests/overlays/services/test_control.py::test_rejects_a_counter_value_below_min ERROR tests/overlays/services/test_control.py::test_rejects_a_counter_value_above_max ERROR tests/overlays/services/test_control.py::test_rejects_a_non_numeric_counter_value ERROR tests/overlays/services/test_control.py::test_accepts_a_labeled_counter_value_from_its_sequence ERROR tests/overlays/services/test_control.py::test_rejects_a_labeled_counter_value_outside_its_sequence ERROR tests/overlays/services/test_control.py::test_accepts_a_select_value_in_options ERROR tests/overlays/services/test_control.py::test_rejects_a_select_value_not_in_options ERROR tests/overlays/services/test_control.py::test_accepts_a_public_image_url ERROR tests/overlays/services/test_control.py::test_rejects_a_private_image_url ERROR tests/overlays/services/test_create_project.py::test_free_account_cannot_create_a_blank_custom_canvas_project ERROR tests/overlays/services/test_create_project.py::test_free_account_can_instantiate_a_free_visibility_template ERROR tests/overlays/services/test_create_project.py::test_free_account_cannot_instantiate_a_premium_visibility_template ERROR tests/overlays/services/test_create_project.py::test_premium_account_can_create_a_blank_custom_canvas_project ERROR tests/overlays/services/test_create_project.py::test_template_controlled_without_a_template_is_rejected ERROR tests/overlays/services/test_create_project.py::test_creating_with_a_nonexistent_template_id_is_rejected ERROR tests/overlays/services/test_create_project.py::test_an_account_with_no_preexisting_plan_defaults_to_free_instead_of_500ing ERROR tests/overlays/services/test_defaults.py::test_ensure_creates_free_plan_for_account ERROR tests/overlays/services/test_defaults.py::test_ensure_is_idempotent - d... ERROR tests/overlays/services/test_defaults.py::test_ensure_does_not_downgrade_an_existing_plan ERROR tests/overlays/services/test_defaults.py::test_plan_provisioned_on_account_cqrs_created ERROR tests/overlays/services/test_image_url_validation.py::test_create_rejects_a_config_with_a_private_image_url ERROR tests/overlays/services/test_image_url_validation.py::test_create_accepts_a_config_with_a_public_image_url ERROR tests/overlays/services/test_image_url_validation.py::test_update_rejects_a_config_with_a_private_image_url ERROR tests/overlays/services/test_image_url_validation.py::test_a_config_with_no_image_elements_never_calls_is_public_url ERROR tests/overlays/services/test_image_url_validation.py::test_update_rejects_a_template_controlled_project ERROR tests/overlays/services/test_image_url_validation.py::test_update_on_an_account_with_no_preexisting_plan_defaults_to_free_instead_of_500ing ERROR tests/overlays/services/test_interactive.py::test_session_expires_at_is_none_for_non_interactive_modes ERROR tests/overlays/services/test_interactive.py::test_session_expires_at_is_none_for_a_premium_logged_in_creator ERROR tests/overlays/services/test_interactive.py::test_session_expires_at_has_a_clock_for_a_non_premium_logged_in_creator ERROR tests/overlays/services/test_interactive.py::test_session_expires_at_has_a_clock_for_a_logged_in_creator_with_no_explicit_plan ERROR tests/overlays/services/test_interactive.py::test_session_expires_at_is_created_at_plus_the_free_limit_for_an_anonymous_project ERROR tests/overlays/services/test_interactive.py::test_is_session_expired_false_just_before_the_limit ERROR tests/overlays/services/test_interactive.py::test_is_session_expired_true_just_after_the_limit ERROR tests/overlays/services/test_interactive.py::test_is_session_expired_always_false_for_a_premium_logged_in_creator_even_long_after_creation ERROR tests/overlays/services/test_interactive.py::test_is_session_expired_true_for_a_non_premium_logged_in_creator_long_after_creation ERROR tests/overlays/services/test_interactive.py::test_create_interactive_project_creates_the_project_and_its_first_session_together ERROR tests/overlays/services/test_interactive.py::test_create_interactive_project_with_no_subscription_fields_behaves_as_before ERROR tests/overlays/services/test_interactive.py::test_create_interactive_project_wires_a_valid_automatic_subscription ERROR tests/overlays/services/test_interactive.py::test_create_interactive_project_rolls_back_atomically_on_an_invalid_subscription ERROR tests/overlays/services/test_interactive.py::test_add_project_session_never_accepts_subscription_fields ERROR tests/overlays/services/test_interactive.py::test_create_interactive_project_never_gates_on_tier_even_for_a_free_account ERROR tests/overlays/services/test_interactive.py::test_create_interactive_project_requires_a_template_regardless_of_created_by ERROR tests/overlays/services/test_interactive.py::test_create_interactive_project_rejects_a_nonexistent_template ERROR tests/overlays/services/test_interactive.py::test_can_add_session_false_for_an_anonymous_project ERROR tests/overlays/services/test_interactive.py::test_can_add_session_false_for_a_free_logged_in_account ERROR tests/overlays/services/test_interactive.py::test_can_add_session_true_for_a_premium_logged_in_account ERROR tests/overlays/services/test_interactive.py::test_add_project_session_rejects_a_non_premium_account ERROR tests/overlays/services/test_interactive.py::test_add_project_session_starts_empty_not_a_clone_of_the_default_session ERROR tests/overlays/services/test_interactive.py::test_add_project_session_defaults_label_to_none ERROR tests/overlays/services/test_interactive.py::test_update_session_state_rejects_an_expired_anonymous_session ERROR tests/overlays/services/test_interactive.py::test_update_session_state_replaces_config_wholesale_when_not_expired ERROR tests/overlays/services/test_interactive.py::test_update_session_state_never_expires_for_a_premium_logged_in_creator ERROR tests/overlays/services/test_interactive.py::test_update_session_state_rejects_an_expired_non_premium_logged_in_creator ERROR tests/overlays/services/test_interactive.py::test_get_session_for_write_rejects_a_user_logged_into_the_anonymous_projects_own_owner_account ERROR tests/overlays/services/test_interactive.py::test_get_session_for_write_rejects_a_different_user_of_the_same_account ERROR tests/overlays/services/test_interactive.py::test_get_session_for_write_allows_the_actual_creator ERROR tests/overlays/services/test_interactive.py::test_get_session_for_render_rejects_a_user_logged_into_the_anonymous_projects_own_owner_account_when_unpublished ERROR tests/overlays/services/test_interactive.py::test_get_session_for_render_allows_the_actual_creator_to_preview_an_unpublished_session ERROR tests/overlays/services/test_interactive.py::test_delete_project_session_refuses_to_remove_the_last_remaining_output ERROR tests/overlays/services/test_interactive.py::test_delete_project_session_removes_an_additional_output ERROR tests/overlays/services/test_packs.py::test_manual_mode_is_always_a_noop ERROR tests/overlays/services/test_packs.py::test_rejects_automatic_for_a_non_premium_account ERROR tests/overlays/services/test_packs.py::test_rejects_a_target_owned_by_a_different_account ERROR tests/overlays/services/test_packs.py::test_rejects_a_teammates_session_in_the_same_pack ERROR tests/overlays/services/test_packs.py::test_rejects_a_target_from_a_different_pack ERROR tests/overlays/services/test_packs.py::test_rejects_a_target_with_no_pack_at_all ERROR tests/overlays/services/test_packs.py::test_rejects_automatic_with_no_target ERROR tests/overlays/services/test_packs.py::test_rejects_a_self_reference - ... ERROR tests/overlays/services/test_packs.py::test_rejects_when_the_subscribers_own_created_by_is_none ERROR tests/overlays/services/test_packs.py::test_rejects_when_the_targets_created_by_is_none ERROR tests/overlays/services/test_packs.py::test_accepts_a_valid_same_account_same_user_same_pack_target ERROR tests/overlays/services/test_resolve_render_config.py::test_merges_overrides_onto_the_template_config ERROR tests/overlays/services/test_resolve_render_config.py::test_a_stale_override_path_is_skipped_instead_of_raising ERROR tests/overlays/services/test_seed_templates.py::test_seeds_at_least_one_template_per_category ERROR tests/overlays/services/test_seed_templates.py::test_is_idempotent - dj... ERROR tests/overlays/services/test_seed_templates.py::test_every_seeded_template_has_a_description_for_the_gallery_dialog ERROR tests/overlays/services/test_seed_templates.py::test_seeded_templates_are_active_and_free_by_default ERROR tests/overlays/services/test_seed_templates.py::test_seeds_padel_scoreboard_exercising_every_element_and_control_field_type ERROR tests/overlays/services/test_seed_templates.py::test_creates_the_padel_tennis_match_day_pack ERROR tests/overlays/services/test_seed_templates.py::test_attaches_the_pack_to_a_freshly_seeded_scoreboard_template ERROR tests/overlays/services/test_seed_templates.py::test_attaches_the_pack_to_an_already_existing_scoreboard_template ERROR tests/overlays/services/test_seed_templates.py::test_seeds_a_match_info_card_template_in_the_same_pack ERROR tests/overlays/services/test_seed_templates.py::test_seeding_twice_does_not_duplicate_the_pack ERROR tests/overlays/test_models.py::test_overlay_pack_creation_defaults - dj... ERROR tests/overlays/test_models.py::test_overlay_pack_slug_unique - django.d... ERROR tests/overlays/test_models.py::test_overlay_template_pack_defaults_to_none ERROR tests/overlays/test_models.py::test_overlay_template_pack_settable_and_survives_pack_deletion ERROR tests/overlays/test_models.py::test_project_session_sync_mode_defaults_to_manual ERROR tests/overlays/test_models.py::test_project_session_can_subscribe_to_another_session ERROR tests/overlays/test_models.py::test_project_session_survives_subscribed_session_deletion ERROR tests/recording/test_ffmpeg.py::test_build_recording_object_url_stream_uses_streams_path_and_userinfo ERROR tests/recording/test_ffmpeg.py::test_build_recording_object_url_stream_returns_none_on_auth_failure ERROR tests/recording/test_ffmpeg.py::test_build_recording_object_url_composition_uses_live_path_and_userinfo ERROR tests/recording/test_ffmpeg.py::test_build_recording_object_url_composition_returns_none_on_auth_failure ERROR tests/recording/test_models.py::test_composition_recording_is_valid - d... ERROR tests/recording/test_models.py::test_stream_recording_is_valid - django... ERROR tests/recording/test_models.py::test_multiple_recordings_of_same_object_allowed ERROR tests/recording/test_tasks.py::test_start_recording_task_dispatches_record_with_resolved_url ERROR tests/recording/test_tasks.py::test_start_recording_task_fails_recording_when_url_unavailable ERROR tests/recording/test_tasks.py::test_start_recording_task_returns_early_when_recording_missing ERROR tests/recording/test_tasks.py::test_record_streams_directly_to_storage_no_local_file ERROR tests/recording/test_tasks.py::test_record_marks_failed_and_terminates_on_upload_error ERROR tests/recording/test_tasks.py::test_record_returns_early_when_recording_missing ERROR tests/recording/test_views.py::test_create_recording_for_live_composition ERROR tests/recording/test_views.py::test_create_recording_rejects_non_live_composition ERROR tests/recording/test_views.py::test_create_recording_for_transmitting_stream ERROR tests/recording/test_views.py::test_create_recording_rejects_non_transmitting_stream ERROR tests/recording/test_views.py::test_create_recording_cross_account_rejected ERROR tests/recording/test_views.py::test_two_sequential_recordings_of_same_composition_produce_two_rows ERROR tests/recording/test_views.py::test_stop_recording - django.db.utils.Op... ERROR tests/recording/test_views.py::test_retrieve_recording_serializes_owner_as_reference ERROR tests/recording/test_views.py::test_get_queryset_excludes_other_accounts_recordings ERROR tests/recording/test_views.py::test_list_filters_by_object_type_and_object_id_via_rql ERROR tests/recording/test_views.py::test_requires_auth - django.db.utils.Ope... ERROR tests/sources/api/test_views.py::test_sources_auth_overlay_source_read_returns_200 ERROR tests/sources/api/test_views.py::test_sources_auth_requires_code_context ERROR tests/sources/api/test_views.py::test_streams_auth_read_returns_200 - d... ERROR tests/sources/api/test_views.py::test_streams_auth_publish_allowed_when_pending ERROR tests/sources/api/test_views.py::test_streams_auth_publish_dispatches_notify_stream_starting_when_pending ERROR tests/sources/api/test_views.py::test_streams_auth_publish_reconnect_skips_notify_stream_starting ERROR tests/sources/api/test_views.py::test_streams_auth_read_rejected_when_pending ERROR tests/sources/api/test_views.py::test_streams_auth_rejected_when_not_active ERROR tests/sources/api/test_views.py::test_streams_auth_requires_code_context ERROR tests/sources/api/test_views.py::test_streams_auth_rejects_url_path_object_id_mismatch ERROR tests/sources/api/test_views.py::test_composition_auth_publish_returns_200 ERROR tests/sources/api/test_views.py::test_composition_auth_publish_rejected_when_not_active ERROR tests/sources/api/test_views.py::test_composition_ready_promotes_target_phase ERROR tests/sources/api/test_views.py::test_composition_ready_returns_404_when_composition_not_found ERROR tests/sources/api/test_views.py::test_composition_disconnected_is_a_no_op ERROR tests/sources/api/test_views.py::test_sources_ready_marks_overlay_session_running ERROR tests/sources/api/test_views.py::test_sources_ready_returns_404_when_source_not_found ERROR tests/sources/api/test_views.py::test_streams_ready_dispatches_notify_stream_transmitting ERROR tests/sources/api/test_views.py::test_streams_disconnected_skips_already_disconnected ERROR tests/sources/api/test_views.py::test_streams_disconnected_dispatches_double_check ERROR tests/sources/api/test_views.py::test_streams_ready_returns_404_when_stream_not_found ERROR tests/sources/api/test_views.py::test_sources_validate - django.db.util... ERROR tests/sources/services/test_mediamtx.py::test_authorize_composition_publish_allowed_when_active ERROR tests/sources/services/test_mediamtx.py::test_authorize_composition_publish_rejected_when_not_active ERROR tests/sources/services/test_mediamtx.py::test_authorize_composition_publish_rejected_on_token_mismatch ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_publish_allowed_when_starting ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_publish_allowed_when_pending ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_publish_when_pending_dispatches_notify_stream_starting ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_read_rejected_when_pending ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_read_allowed_when_transmitting ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_rejected_when_finished ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_rejected_on_token_mismatch ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_rejected_when_not_found ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_publish_reconnect_skips_notify_stream_starting ERROR tests/sources/services/test_mediamtx.py::test_authorize_viewer_read_allowed_when_composition_live ERROR tests/sources/services/test_mediamtx.py::test_authorize_viewer_read_rejected_when_composition_not_active ERROR tests/sources/services/test_mediamtx.py::test_authorize_viewer_read_rejected_when_composition_in_preview ERROR tests/sources/services/test_mediamtx.py::test_authorize_viewer_read_rejected_on_installation_mismatch ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_viewer_read_allowed_when_transmitting ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_viewer_read_rejected_when_finished ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_viewer_read_rejected_on_installation_mismatch ERROR tests/sources/services/test_mediamtx.py::test_authorize_stream_viewer_read_rejected_for_stream_typed_token ERROR tests/sources/services/test_mediamtx.py::test_authorize_interactive_source_publish_allowed ERROR tests/sources/services/test_mediamtx.py::test_authorize_interactive_source_read_allowed ERROR tests/sources/services/test_mediamtx.py::test_authorize_interactive_source_rejected_on_token_mismatch ERROR tests/sources/services/test_mediamtx.py::test_authorize_interactive_source_rejected_without_capture_session ERROR tests/sources/services/test_mediamtx.py::test_authorize_interactive_source_rejected_when_not_found ERROR tests/sources/services/test_mediamtx.py::test_authorize_interactive_source_rejected_for_controller_stream_row ERROR tests/sources/services/test_mediamtx.py::test_notify_overlay_ready_state_dispatches_add_overlay_when_pipeline_running ERROR tests/sources/services/test_mediamtx.py::test_notify_overlay_ready_state_fans_out_to_live_copies ERROR tests/sources/services/test_mediamtx.py::test_notify_overlay_ready_state_does_not_attach_removed_copies ERROR tests/sources/services/test_mediamtx.py::test_notify_overlay_ready_state_marks_attached_without_dispatch_when_no_pipeline ERROR tests/sources/services/test_mediamtx.py::test_notify_overlay_ready_state_ignores_when_session_not_activating ERROR tests/sources/services/test_mediamtx.py::test_notify_overlay_ready_state_not_ready_unwinds_attached_source ERROR tests/sources/services/test_mediamtx.py::test_notify_composition_ready_state_promotes_phase_to_target_phase ERROR tests/sources/services/test_mediamtx.py::test_notify_composition_ready_state_promotes_to_preview_sets_previewed_at ERROR tests/sources/services/test_mediamtx.py::test_notify_composition_ready_state_no_op_when_no_target_phase_pending ERROR tests/sources/services/test_mediamtx.py::test_notify_composition_ready_state_not_ready_does_not_touch_phase ERROR tests/broadcast/test_consumers.py::test_broadcast_consumer_connects_and_receives_state ERROR tests/broadcast/test_consumers.py::test_broadcast_consumer_rejects_without_auth ERROR tests/broadcast/test_consumers.py::test_broadcast_consumer_receives_state_update ERROR tests/broadcast/test_routing.py::test_broadcast_ws_route_resolves_on_the_real_mounted_application ERROR tests/compositor/services/test_lifecycle.py::test_switch_scene_generation_bump_is_atomic_under_concurrent_calls ERROR tests/overlays/test_consumers.py::test_rejects_connection_without_auth ERROR tests/overlays/test_consumers.py::test_code_token_for_a_different_project_is_rejected ERROR tests/overlays/test_consumers.py::test_valid_code_token_connects_and_receives_resolved_state ERROR tests/overlays/test_consumers.py::test_owner_can_connect_to_their_own_unpublished_draft ERROR tests/overlays/test_consumers.py::test_non_owner_cannot_connect_to_an_unpublished_draft ERROR tests/overlays/test_consumers.py::test_receives_broadcast_state_update ERROR tests/overlays/test_consumers.py::test_unpublish_event_closes_the_connection ERROR tests/overlays/test_routing.py::test_overlays_ws_route_resolves_on_the_real_mounted_application ERROR tests/overlays/test_routing.py::test_no_collision_with_the_existing_broadcast_route ERROR tests/overlays/test_routing.py::test_sessions_ws_route_resolves_on_the_real_mounted_application ERROR tests/overlays/test_session_consumers.py::test_rejects_connection_without_auth ERROR tests/overlays/test_session_consumers.py::test_code_token_for_a_different_session_is_rejected ERROR tests/overlays/test_session_consumers.py::test_url_project_id_not_matching_the_sessions_real_project_is_rejected ERROR tests/overlays/test_session_consumers.py::test_a_control_purpose_token_cannot_open_the_read_ws ERROR tests/overlays/test_session_consumers.py::test_valid_read_token_connects_and_receives_resolved_state ERROR tests/overlays/test_session_consumers.py::test_owner_can_connect_to_their_own_unpublished_session ERROR tests/overlays/test_session_consumers.py::test_non_owner_cannot_connect_to_an_unpublished_session ERROR tests/overlays/test_session_consumers.py::test_receives_broadcast_state_update ERROR tests/overlays/test_session_consumers.py::test_deletion_closes_the_connection ============ 139 passed, 4 warnings, 573 errors in 64.83s (0:01:04) ============